load("@fbsource//tools/build_defs:rust_binary.bzl", "rust_binary")

oncall("scm_server_infra")

rust_binary(
    name = "commit_validator",
    srcs = glob(["src/**/*.rs"]),
    test_deps = [
        "fbsource//third-party/rust:maplit",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shed/fbinit:fbinit-tokio",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/tests/utils:tests_utils",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:ref-cast",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/borrowed:borrowed",
        "//common/rust/shed/cloned:cloned",
        "//common/rust/shed/facet:facet",
        "//common/rust/shed/fbinit:fbinit",
        "//common/rust/shed/futures_stats:futures_stats",
        "//common/rust/shed/stats:stats",
        "//eden/mononoke/blobstore:blobstore",
        "//eden/mononoke/blobstore:blobstore_factory",
        "//eden/mononoke/cmdlib/mononoke_app:mononoke_app",
        "//eden/mononoke/common/metadata:metadata",
        "//eden/mononoke/common/rust/sql_ext:sql_ext",
        "//eden/mononoke/common/scuba_ext:scuba_ext",
        "//eden/mononoke/common/sql_construct:sql_construct",
        "//eden/mononoke/derived_data/mercurial_derivation:mercurial_derivation",
        "//eden/mononoke/features/commit_rewriting/live_commit_sync_config:live_commit_sync_config",
        "//eden/mononoke/features/commit_rewriting/movers:movers",
        "//eden/mononoke/features/commit_rewriting/synced_commit_mapping:synced_commit_mapping",
        "//eden/mononoke/features/cross_repo_sync:cross_repo_sync",
        "//eden/mononoke/manifest:manifest",
        "//eden/mononoke/megarepo_api:pushredirect",
        "//eden/mononoke/mercurial:mercurial_types",
        "//eden/mononoke/metaconfig:metaconfig_types",
        "//eden/mononoke/mononoke_macros:mononoke_macros",
        "//eden/mononoke/mononoke_types:mononoke_types",
        "//eden/mononoke/repo_attributes/bookmarks:bookmarks",
        "//eden/mononoke/repo_attributes/commit_graph/commit_graph:commit_graph",
        "//eden/mononoke/repo_attributes/mutable_counters:mutable_counters",
        "//eden/mononoke/repo_attributes/repo_blobstore:repo_blobstore",
        "//eden/mononoke/repo_attributes/repo_derived_data:repo_derived_data",
        "//eden/mononoke/repo_attributes/repo_identity:repo_identity",
        "//eden/mononoke/repo_attributes/sql_query_config:sql_query_config",
        "//eden/mononoke/server/context:context",
        "//eden/scm/lib/clientinfo:clientinfo",
    ],
)
